import os
import time
from enum import Enum
import threading
from datetime import datetime, timedelta


class Workspace(object):
    def __init__(self, root_path, name):
        root_path = os.path.join(root_path, 'workspace')
        
        self.path = os.path.join(root_path, name)
        self.run_log = os.path.join(self.path, name)
        
        if not os.access(root_path, os.F_ok):
            os.mkdir(root_path, 0o700)
        if not os.access(self.path, os.F_ok):
            os.mkdir(self.path, 0o700)
        
        if not os.access(self.run_log, os.F_ok):
            f = open(self.run_log, 'a')
            f.write('\n\n>>>>>>>>>>>><<<<<<<<<<<\n\n')
            f.close()
            